From news-rocq!nslave.kpnqwest.net!nmaster.kpnqwest.net!npeer.kpnqwest.net!howland.erols.net!panix!newsmaster.cc.columbia.edu!phl-feed.news.verio.net!news.verio.net!news.ttsg.com!paul_virak_khuong@yahoo.com Tue Apr 10 16:45:40 2001 Article: 12509 of rec.games.corewar Path: news-rocq!nslave.kpnqwest.net!nmaster.kpnqwest.net!npeer.kpnqwest.net!howland.erols.net!panix!newsmaster.cc.columbia.edu!phl-feed.news.verio.net!news.verio.net!news.ttsg.com!paul_virak_khuong@yahoo.com From: "Paul Khuong" Newsgroups: rec.games.corewar Subject: RE: Help with optimization Date: 6 Apr 2001 23:31:21 -0400 Organization: TTSG Lines: 93 Distribution: world Message-ID: Reply-To: paul_virak_khuong@yahoo.com NNTP-Posting-Host: odin.ttsg.com X-Trace: odin.ttsg.com 986614281 20195 216.231.111.29 (7 Apr 2001 03:31:21 GMT) X-Complaints-To: abuse@news.ttsg.com NNTP-Posting-Date: 7 Apr 2001 03:31:21 GMT Originator: corewar-l@koth.org X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) Xref: news-rocq rec.games.corewar:12509 > -----Original Message----- > From: corewar-l@koth.org [mailto:corewar-l@koth.org]On Behalf Of > birk@andromeda.ociw.edu > Sent: 6 avril, 2001 10:29 > To: Multiple recipients of list COREWAR-L > Subject: Re: Help with optimization > > > MACSNITKOFF wrote: > > Hey, you may remember me. . . I now have a dwarf throwing dwarf > > [...] > > ;redcode-94 > > ;name DwarfBomb > > [...] > > I think this is as close as possible to your original idea. I hope > the comments I added explain the changes: Actually, not quite 8) here's how i'd do it: ;redcode-94 ;name DwarfBomb (v2) ;author Ben Snitkoff ;stategy Dwarf throwing dwarf ;strategy [PVK] Actually, it's more like a warrior that spawns tons of stones, since the "main" part isnt a dwarf. Anyway... ;assert 1 org main bomb: DAT #12, #-12 ;You could use antoher stepsize...3044, fe. dwarf: ADD bomb, 1 ; move here from after 'jmp dwarf' (CCB) MOV bomb, 6 JMP dwarf ; in most warriors, this would be a djn, but then, ;most warriors also have a spl 0 on the top of the loop... you could still do it, though main: ADD #800-3, $ptr ; changed to '$' from '@' (CCB) [PVK] Changed the step so ;the loop rolls perfectly around the core(the ">" change the value of ptr's b-field too) MOV bomb, >ptr ; changed to '>' from '@' (CCB) MOV bomb+1, >ptr ; changed 'dwarf' to 'bomb' (CCB) MOV bomb+2, >ptr MOV bomb+3, >ptr SPL ;redcode-94 > ;name DwarfBomb (v2) > ;author Ben Snitkoff > ;stategy Dwarf throwing dwarf > ;assert 1 > > org main > > bomb: DAT #33, #33 ; move here from after 'jmp dwarf' (CCB) > dwarf: ADD #12, 2 > SUB #12, 2 > MOV bomb, 6 > MOV bomb, 6 > JMP dwarf > > > main: ADD #800, $ptr ; changed to '$' from '@' (CCB) > ptr: NOP #0, 8 ; changed from DAT (CCB) > MOV bomb, >ptr ; changed to '>' from '@' (CCB) > MOV bomb+1, >ptr ; changed 'dwarf' to 'bomb' (CCB) > MOV bomb+2, >ptr > MOV bomb+3, >ptr > MOV bomb+4, >ptr > MOV bomb+5, >ptr > SPL JMP main > > end > > Christoph _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com